﻿using CPPEI;
using CPPEI.WebApi;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Demo
{
    [PostAction("test","Post","1.0")]
    public class TestPostAction : BaseAction<TestPostParams, TestPostResult>
    {
        protected override ActionResult<TestPostResult> OnExecute(ActionContext context, SysParams sysParams, TestPostParams opParams)
        {
            TestPostResult result = new TestPostResult();
            result.Id = "1";
            //return new ActionResult<TestPostResult>(result);
            return new ActionResult<TestPostResult>(new ServiceResult(2));
        }
    }

    public class TestPostParams
    {
        public string Id { get; set; }

        public string[] StrArr { get; set; }

        
    }

    public class TestPostResult
    {
        public string Id { get; set; }
    }
}